package xyz.zdsoft.course_manage_module.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import xyz.zdsoft.course_manage_module.vo.CourseInfoVo;

/**
 * @author 王林
 * @version 1.0
 * @date 2021-07-23 周五
 * @time 16:16
 * @description
 */
@Mapper
public interface StudentCourseMapper extends BaseMapper<CourseInfoVo> {

    /**
     * @Description: 查询学生个人课程信息
     * @Param: IPage<CourseInfoVo> page
     * @Parm: Wrapper<CourseInfoVo> wrapper
     * @return: xyz.zdsoft.common.utils.IPage<CourseInfoVo>
     * @Author: 王林
     * @Date: 2021/7/23
     */

//    @Select({"<script>", "select id,project_date,course_name,remark,class_rome,sign_in_time,sign_out_time," +
//            "duty_teacher,train_teacher" +
//            " from course_info_view where  " +
//            "<if test=\"ew.sqlSegment != null and ew.sqlSegment != ''\">\n" +
//            "            where ${ew.sqlSegment}\n" +
//            "        </if>",
//            "</script>"})
    @Select({"<script>", "select project_date,course_name,duty_teacher,train_teacher," +
            "remark,class_rome,sign_in_time,sign_out_time " +
            " from stu_personal_course_view\n" +
            "<if test=\"ew.sqlSegment != null and ew.sqlSegment != ''\">\n" +
            "where ${ew.sqlSegment}\n" +
            "        </if>",
            "</script>"})
    IPage<CourseInfoVo> queryCourse(IPage<CourseInfoVo> page,
                                    @Param("ew") Wrapper<CourseInfoVo> wrapper);



}
